﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HROReporting.Services.Interfaces;
using HROReporting.Services.Messaging.SchoolKantoorService;
using HROReporting.Model.SchoolKantoren;
using HROReporting.Infrastructure.UnitOfWork;
using HROReporting.Services.Mapping;

namespace HROReporting.Services.Implementations
{
    public class SchoolKantoorService : ISchoolKantoorService
    {
        private readonly ISchoolKantoorRepository _schoolKantoorRepository;
        private readonly IUnitOfWork _uow;

        public SchoolKantoorService(ISchoolKantoorRepository schoolKantoorRepository, IUnitOfWork uow)
        {
            _schoolKantoorRepository = schoolKantoorRepository;
            _uow = uow;
        }

        public GetSchoolKantoorByResponse GetSchoolKantoorByKantoorCode(GetSchoolKantoorByRequest request)
        {
            GetSchoolKantoorByResponse response = new GetSchoolKantoorByResponse();

            response.SchoolKantoor = _schoolKantoorRepository.GetSchoolKantoorByKantoorCode(request.KantoorCode).ConvertToSchoolKantoorView();

            return response;
        }
    }
}
